class UpperString(object):
    def __init__(self):
        self._value = ''
    def __get__(self, instance, klass):
        return self._value
    def __set__(self, instance, value):
        self._value = value.upper()

class MyClass(object):
    def __init__(self):
        self.attribute = UpperString()

aa = MyClass()
print aa.attribute
aa.attribute="fiint"
print aa.attribute


